<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ page import="com.dom.user" %>
<%@ page import="java.util.ArrayList" %>
<%@ include file="base.jsp"%>

<html>

<head>

    <title>灾害信息系统管理员界面</title>
    
    <style>
       
* {
            font-family: sans-serif; /* Change your font family */
        }

        .content-table
        {
            border-collapse: collapse;
            margin: 25px 0;
            font-size: 0.9em;
            min-width: 400px;
            border-radius: 5px 5px 0 0;
            overflow: hidden;
            box-shadow: 0 0 20px rgba(0, 0, 0, 0.15);
        }

        .content-table thead tr
        {
            background-color: #009879;
            color: #ffffff;
            text-align: left;
            font-weight: bold;
        }

        .content-table th,
        .content-table td
        {
            padding: 12px 15px;
        }

        .content-table tbody tr
        {
            border-bottom: 1px solid #dddddd;
        }

        .content-table tbody tr:nth-of-type(even)
        {
            background-color: #f3f3f3;
        }

        .content-table tbody tr:last-of-type
        {
            border-bottom: 2px solid #009879;
        }

        .content-table tbody tr.active-row
        {
            font-weight: bold;
            color: #009879;
        }
        
   
    </style>

</head>

<body>

<% ArrayList<user> users = (ArrayList<user>) session.getAttribute("users"); 
%>

<div align="center">
   
    <font color="#5f9ea0" size="4">
    //人员管理</font>
    
    <table class="content-table">
       
        <thead>
      
        <tr>
            
            <th>用户名</th>
           
            <th>密码</th>
           
            <th>性别</th>
            
            <th>年龄</th>
          
            <th>学历</th>
            
            <th>工作</th>
           
            <th>操作</th>
       
        </tr>
       
        </thead>
      
        <tbody>
       
        <%
            
        for (int i=0; i<users.size(); i++)
            {
                user temp = users.get(i);
       
                %>
     
        <tr>
          
            <td>
               
                <%=temp.getName()%>
                //获取用户名
            
            </td>
          
            <td>
                
                <%=temp.getPassword()%>
                //获取密码
           
            </td>
          
            <td>
                
                <%=temp.getSex()%>
                //获取性别
           
            </td>
           
            <td>
              
                <%=temp.getAge()%>
                //获取年龄
          
            </td>
           
            <td>
              
                <%=temp.getDegree()%>
                //获取学历
           
            </td>
           
            <td>
            
                <%=temp.getJob()%>
                //获取工作
           
            </td>
          
            <td>
               
                <a href="userManager?action=delete&name=
               
                <%=temp.getName()%>">
               
                <button>删除</button>
             
                </a>
          
            </td>
      
        </tr>
       
        <%
       
            }
    
        %>
       
        </tbody>
   
    </table>

</div>

</body>

</html>
